package com.wise.site.protocol.result;

import org.json.JSONException;
import org.json.JSONObject;

import com.wise.site.protocol.base.SoapItem;
import com.wise.site.protocol.base.SoapResult;
import com.wise.site.utils.Constanct;

/**
 * 列表item
 * @author Administrator
 *
 */
public class InfoItem  extends SoapItem{
	public int id;
	/**
	 * 列表图连接
	 */
	public String iconURL;
	/**
	 * 标题
	 */
	public String tilte;
	/**
	 * 摘要
	 */
	public String snipe;
	/**
	 * 日期
	 */
	public String date;
	
	/**
	 * 来源
	 */
	public String source;
	
	/**
	 * 内容
	 */
	public String content;
	
	/**
	 * 类别
	 */
	public boolean headed;
	
	public InfoItem() {
	}
	
	public InfoItem(JSONObject node) {
		super(node);
	}

	public void parse(JSONObject node) throws JSONException
    {
		id = node.getInt("id");
		date = node.getString("date");
		iconURL = Constanct.IMAGE_PREFIX + node.getString("imageUrl");
		tilte = node.getString("title");
		snipe = node.getString("subtitle");
		content = node.getString("content");
		source = node.getString("source");
		headed = node.getInt("headed") == 1;
		
    }

}
